package com.scujj.cs6.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.scujj.cs6.model.dto.answer.AnswerDTO;
import com.scujj.cs6.model.entity.Answer;
import com.scujj.cs6.model.vo.AnswerVo;
import com.scujj.cs6.model.vo.MyAnswerVo;
import com.scujj.cs6.model.vo.PageVo;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.validation.Valid;

/**
* @author FlanChan
* @description 针对表【answer】的数据库操作Service
* @createDate 2025-03-25 21:21:24
*/
public interface AnswerService extends IService<Answer> {

    PageVo<AnswerVo> getAnswers(int page , int size, Long questionId);

    PageVo<AnswerVo> getFollowedAnswers(int page, int size, HttpServletRequest request);

    void createAnswer(Long id, @Valid AnswerDTO answer, HttpServletRequest request);

    void updateAnswer(Long id, @Valid AnswerDTO answer, HttpServletRequest request);

    void deleteAnswer(Long id, HttpServletRequest request);

    void updateLikeCount(Long id, int i);

    PageVo<MyAnswerVo> getMyAnswers(int page, int size, HttpServletRequest request);
}
